package com.company.设计模式.单例模式;

import com.sun.org.apache.regexp.internal.RE;

/**
 * @author uguoy089
 * @Description:
 * @Date: 2021/5/11 09:08
 */

public class Singleton4 {

    private Singleton4() {
        System.out.println("静态内部类");
    }

    public static class SingletonHolder {
        private static final Singleton4 INSTANCE = new Singleton4();
    }

    public static final Singleton4 getInstance() {
        return SingletonHolder.INSTANCE;
    }
}
